package com.xz.coursearrange.entity;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 */
public class MenuData {
    public static List<Map<String, Object>> getAdminMenuData() {
        List<Map<String, Object>> menuData = new ArrayList<>();

        // 首页
        Map<String, Object> homeItem = new HashMap<>();
        homeItem.put("path", "/home");
        homeItem.put("name", "home");
        homeItem.put("label", "首页");
        homeItem.put("icon", "House");
        homeItem.put("url", "home/Home");
        menuData.add(homeItem);


        // 用户管理
        Map<String, Object> userManagementItem = new HashMap<>();
        userManagementItem.put("label", "用户管理");
        userManagementItem.put("icon", "ChatSquare");
        List<Map<String, Object>> userManagementChildren = new ArrayList<>();

        Map<String, Object> teacherListItem = new HashMap<>();
        teacherListItem.put("path", "/admin/teacherlist");
        teacherListItem.put("name", "TeacherList");
        teacherListItem.put("label", "教师管理");
        teacherListItem.put("icon", "ChatSquare");
        teacherListItem.put("url", "admin/TeacherList");
        userManagementChildren.add(teacherListItem);

        Map<String, Object> studentListItem = new HashMap<>();
        studentListItem.put("path", "/admin/studentlist");
        studentListItem.put("name", "StudentList");
        studentListItem.put("label", "学生管理");
        studentListItem.put("icon", "ChatSquare");
        studentListItem.put("url", "admin/StudentList");
        userManagementChildren.add(studentListItem);

        userManagementItem.put("children", userManagementChildren);
        menuData.add(userManagementItem);

        // 系统数据
//        Map<String, Object> systemDataItem = new HashMap<>();
//        systemDataItem.put("path", "/admin/systemdata");
//        systemDataItem.put("name", "SystemData");
//        systemDataItem.put("label", "系统数据");
//        systemDataItem.put("icon", "ChatSquare");
//        systemDataItem.put("url", "admin/SystemData");
//        menuData.add(systemDataItem);

        // 教学设施管理
        Map<String, Object> teachingFacilityItem = new HashMap<>();
        teachingFacilityItem.put("label", "教学设施管理");
        teachingFacilityItem.put("icon", "ChatSquare");
        List<Map<String, Object>> teachingFacilityChildren = new ArrayList<>();

        Map<String, Object> teachBuildingListItem = new HashMap<>();
        teachBuildingListItem.put("path", "/admin/teachbuildinglist");
        teachBuildingListItem.put("name", "TeachBuildingList");
        teachBuildingListItem.put("label", "教学楼管理");
        teachBuildingListItem.put("icon", "ChatSquare");
        teachBuildingListItem.put("url", "admin/TeachBuildingList");
        teachingFacilityChildren.add(teachBuildingListItem);


        Map<String, Object> classroomListItem = new HashMap<>();
        classroomListItem.put("path", "/admin/classroomlist");
        classroomListItem.put("name", "Classroomlist");
        classroomListItem.put("label", "教室管理");
        classroomListItem.put("icon", "ChatSquare");
        classroomListItem.put("url", "admin/ClassroomList");
        teachingFacilityChildren.add(classroomListItem);

        Map<String, Object> setTeachAreaItem = new HashMap<>();
        setTeachAreaItem.put("path", "/admin/setteacharea");
        setTeachAreaItem.put("name", "Setteacharea");
        setTeachAreaItem.put("label", "教学区域安排");
        setTeachAreaItem.put("icon", "ChatSquare");
        setTeachAreaItem.put("url", "admin/SetTeachArea");
        teachingFacilityChildren.add(setTeachAreaItem);

        teachingFacilityItem.put("children", teachingFacilityChildren);
        menuData.add(teachingFacilityItem);

        // 教材资料
        Map<String, Object> courseInfoListItem = new HashMap<>();
        courseInfoListItem.put("path", "/courseinfolist");
        courseInfoListItem.put("name", "CourseInfoList");
        courseInfoListItem.put("label", "教材资料");
        courseInfoListItem.put("icon", "ChatSquare");
        courseInfoListItem.put("url", "admin/CourseInfoList");
        menuData.add(courseInfoListItem);

        // 课程管理
        Map<String, Object> courseItem = new HashMap<>();
        courseItem.put("label", "课程编排");
        courseItem.put("icon", "ChatSquare");
        List<Map<String, Object>> courseItemChildren = new ArrayList<>();

        // 课表
        Map<String, Object> courseTableItem = new HashMap<>();
        courseTableItem.put("path", "/coursetable");
        courseTableItem.put("name", "CourseTable");
        courseTableItem.put("label", "学生课表");
        courseTableItem.put("icon", "ChatSquare");
        courseTableItem.put("url", "course/CourseTable");
        courseItemChildren.add(courseTableItem);

        // 教师课表
        Map<String, Object> courseTableTeacherItem = new HashMap<>();
        courseTableTeacherItem.put("path", "/coursetableteacher");
        courseTableTeacherItem.put("name", "CourseTableTeacher");
        courseTableTeacherItem.put("label", "教师课表");
        courseTableTeacherItem.put("icon", "ChatSquare");
        courseTableTeacherItem.put("url", "course/CourseTableTeacher");
        courseItemChildren.add(courseTableTeacherItem);

        // 教室课表
        Map<String, Object> courseTableClassroomItem = new HashMap<>();
        courseTableClassroomItem.put("path", "/coursetableclassroom");
        courseTableClassroomItem.put("name", "CourseTableClassroom");
        courseTableClassroomItem.put("label", "教室课表");
        courseTableClassroomItem.put("icon", "ChatSquare");
        courseTableClassroomItem.put("url", "course/CourseTableClassroom");
        courseItemChildren.add(courseTableClassroomItem);

        // 课程计划
        Map<String, Object> classTaskListItem = new HashMap<>();
        classTaskListItem.put("path", "/classtasklist");
        classTaskListItem.put("name", "ClassTaskList");
        classTaskListItem.put("label", "课程任务");
        classTaskListItem.put("icon", "ChatSquare");
        classTaskListItem.put("url", "course/ClassTaskList");
        courseItemChildren.add(classTaskListItem);

        Map<String, Object> editClassTaskItem = new HashMap<>();
        editClassTaskItem.put("path", "/manualclasstask");
        editClassTaskItem.put("name", "ManualClassTask");
        editClassTaskItem.put("label", "手动处理排课");
        editClassTaskItem.put("icon", "ChatSquare");
        editClassTaskItem.put("url", "course/ManualClassTask");
        courseItemChildren.add(editClassTaskItem);

        courseItem.put("children", courseItemChildren);
        menuData.add(courseItem);

        // 班级
        Map<String, Object> classManagerItem = new HashMap<>();
        classManagerItem.put("path", "/classmanager");
        classManagerItem.put("name", "ClasssManager");
        classManagerItem.put("icon", "ChatSquare");
        classManagerItem.put("label", "班级管理");
        classManagerItem.put("url", "admin/ClassManager");
        menuData.add(classManagerItem);

        // 修改密码
//        Map<String, Object> updatePassItem = new HashMap<>();
//        updatePassItem.put("path", "/updatepass");
//        updatePassItem.put("name", "UpdatePass");
//        updatePassItem.put("label", "修改密码");
//        updatePassItem.put("icon", "ChatSquare");
//        updatePassItem.put("url", "user/UpdatePass");
//        menuData.add(updatePassItem);

        return menuData;
    }


    public static List<Map<String, String>> getStudentMenuData() {
        List<Map<String, String>> menuData = new ArrayList<>();

        // 首页
        Map<String, String> homeItem = new HashMap<>();
        homeItem.put("path", "/home");
        homeItem.put("name", "home");
        homeItem.put("label", "首页");
        homeItem.put("icon", "House");
        homeItem.put("url", "home/Home");
        menuData.add(homeItem);

        // 课表
        Map<String, String> courseTableItem = new HashMap<>();
        courseTableItem.put("path", "/coursetable");
        courseTableItem.put("name", "CourseTable");
        courseTableItem.put("label", "课表");
        courseTableItem.put("icon", "ChatSquare");
        courseTableItem.put("url", "course/CourseTable");
        menuData.add(courseTableItem);

        // 修改密码
        Map<String, String> updatePassItem = new HashMap<>();
        updatePassItem.put("path", "/updatepass");
        updatePassItem.put("name", "UpdatePass");
        updatePassItem.put("label", "修改密码");
        updatePassItem.put("icon", "ChatSquare");
        updatePassItem.put("url", "user/UpdatePass");
        menuData.add(updatePassItem);


        // 学生中心
        Map<String, String> userCenterItem = new HashMap<>();
        userCenterItem.put("path", "/student/usercenter");
        userCenterItem.put("name", "UserCenter");
        userCenterItem.put("label", "学生中心");
        userCenterItem.put("icon", "ChatSquare");
        userCenterItem.put("url", "student/UserCenter");
        menuData.add(userCenterItem);


        // 空教室查询
        Map<String, String> emptyClassroomItem = new HashMap<>();
        emptyClassroomItem.put("path", "/course/emptyclassroom");
        emptyClassroomItem.put("name", "EmptyClassroom");
        emptyClassroomItem.put("label", "空教室查询");
        emptyClassroomItem.put("icon", "ChatSquare");
        emptyClassroomItem.put("url", "course/EmptyClassroom");
        menuData.add(emptyClassroomItem);

        return menuData;
    }

    public static List<Map<String, String>> getTeacherMenuData() {
        List<Map<String, String>> menuData = new ArrayList<>();

        // 首页
        Map<String, String> homeItem = new HashMap<>();
        homeItem.put("path", "/home");
        homeItem.put("name", "home");
        homeItem.put("label", "首页");
        homeItem.put("icon", "House");
        homeItem.put("url", "home/Home");
        menuData.add(homeItem);

        // 课表
        Map<String, String> courseTableItem = new HashMap<>();
        courseTableItem.put("path", "/coursetable");
        courseTableItem.put("name", "CourseTable");
        courseTableItem.put("label", "课表");
        courseTableItem.put("icon", "ChatSquare");
        courseTableItem.put("url", "course/CourseTable");
        menuData.add(courseTableItem);

        // 教师课表
        Map<String, String> courseTableTeacherItem = new HashMap<>();
        courseTableTeacherItem.put("path", "/coursetableteacher");
        courseTableTeacherItem.put("name", "CourseTableTeacher");
        courseTableTeacherItem.put("label", "教师课表");
        courseTableTeacherItem.put("icon", "ChatSquare");
        courseTableTeacherItem.put("url", "course/CourseTableTeacher");
        menuData.add(courseTableTeacherItem);

        // 修改密码
//        Map<String, String> updatePassItem = new HashMap<>();
//        updatePassItem.put("path", "/updatepass");
//        updatePassItem.put("name", "UpdatePass");
//        updatePassItem.put("label", "修改密码");
//        updatePassItem.put("icon", "ChatSquare");
//        updatePassItem.put("url", "user/UpdatePass");
//        menuData.add(updatePassItem);

        // 空教室查询
        Map<String, String> emptyClassroomItem = new HashMap<>();
        emptyClassroomItem.put("path", "/course/emptyclassroom");
        emptyClassroomItem.put("name", "EmptyClassroom");
        emptyClassroomItem.put("label", "空教室查询");
        emptyClassroomItem.put("icon", "ChatSquare");
        emptyClassroomItem.put("url", "course/EmptyClassroom");
        menuData.add(emptyClassroomItem);

        return menuData;
    }
}